package com.beagle.njddapp.base;

import com.beagle.njddapp.bean.StringBean;
import com.beagle.njddapp.bean.oil.HandleBean;
import com.beagle.njddapp.bean.oil.OilBean;
import com.beagle.njddapp.bean.oil.OilHomeBean;
import com.beagle.njddapp.bean.oil.RateBean;
import com.beagle.njddapp.net.BaseOilHttpListResponse;
import com.beagle.njddapp.net.BaseOilHttpResponse;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;

/**
 * @author hxx
 * @date 2021-03-15 19:58
 * 加油车驾驶员相关接口
 */
public interface OilApiService {
    /**
     * 加油车驾驶员-获取待加油订单
     * @return
     */
    @POST("app/api/fuelTaker/orders/pool/{pageSize}/{pageNo}")
    Observable<BaseOilHttpListResponse<OilHomeBean>> getOilList(@Path("pageSize") String pageSize, @Path("pageNo") String pageNo, @Body RequestBody body);



    /**
     * 加油车驾驶员-加油心跳
     * @return
     */
    @POST("app/api/fuelTaker/orders/handleTick/1000/1")
    Observable<BaseOilHttpListResponse<OilHomeBean>> handleTick(@Body RequestBody body);

    /**
     * 加油车驾驶员-加油心跳
     * @return
     */
    @POST("app/api/fuelTaker/orders/closeHandle")
    Observable<BaseOilHttpResponse> closeHandle( @Body RequestBody body);



    /**
     * 加油车驾驶员-加油订单详情
     * @return
     */
    @POST("app/api/fuelTaker/orders/detail/{orderId}")
    Observable<BaseOilHttpResponse<OilHomeBean>> getOilDetail(@Path("orderId") String orderId,@Body RequestBody body);


    /**
     * 加油车驾驶员-我的订单
     * @return
     */
    @POST("app/api/fuelTaker/orders/my/{pageSize}/{pageNo}")
    Observable<BaseOilHttpListResponse<OilHomeBean>> getOrderList(@Path("pageSize") String pageSize, @Path("pageNo") String pageNo,@Body RequestBody body);


    /**
     * 加油车驾驶员-我的加油车
     * @return
     */
    @POST("app/api/fuelTaker/myCar")
    Observable<BaseOilHttpResponse<OilBean>> myCard(@Body RequestBody body);


    /**
     * 加油车驾驶员-重新绑定加油车
     * @return
     */
    @POST("app/api/fuelTaker/resetCar")
    Observable<BaseOilHttpResponse> resetOilCar(@Body RequestBody body);


    /**
     * 加油车驾驶员-更新加油车
     * @return
     */
    @POST("app/api/fuelTaker/updateCar")
    Observable<BaseOilHttpResponse> updateOilCar(@Body RequestBody body  );



    /**
     * 加油车驾驶员-更新加油车
     * @return
     */
    @GET("app/api/fuelTaker/querySwitch")
    Observable<StringBean> querySwitch( );



    /**
     * 加油车驾驶员-接单
     * @return
     */
    @POST("app/api/fuelTaker/orders/replyOrder/{orderId}")
    Observable<BaseOilHttpResponse> JieDan(@Path("orderId") String orderId,@Body RequestBody body  );



    /**
     * 加油车驾驶员-确认到达
     * @return
     */
    @POST("app/api/fuelTaker/orders/arrived/{orderId}")
    Observable<BaseOilHttpResponse> arrived(@Path("orderId") String orderId,@Body RequestBody body  );


    /**
     * 加油车驾驶员-完成
     * @return
     */
    @POST("app/api/fuelTaker/orders/submit/{orderId}/{meter}")
    Observable<BaseOilHttpResponse> submit(@Path("orderId") String orderId,@Path("meter") float meter,@Body RequestBody body  );


    /**
     * 加油车驾驶员-确认到达
     * @return
     */
    @POST("app/api/fuelTaker/orders/confirmOrderPayment/{orderId}")
    Observable<BaseOilHttpResponse> confirmOrderPayment(@Path("orderId") String orderId,@Body RequestBody body  );


    /**
     * 加油车驾驶员-完成
     * @return
     */
    @POST("app/api/fuelTaker/getTakerRate")
    Observable<BaseOilHttpResponse<RateBean>> getTakerRate(@Body RequestBody body  );

}
